package com.probox.modules.controller.wechat;

import com.probox.common.core.domain.WechatInfomation;
import com.probox.common.core.utils.SecurityUtils;
import com.probox.common.core.web.controller.BaseController;
import com.probox.common.core.web.domain.AjaxResult;
import com.probox.common.entity.service.wechat.WechatInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/wechat/informationController")
public class WechatInformationController extends BaseController {


    @Autowired
    private WechatInformationService wechatInformationService;




    /**
     * 推送小程序消息
     */
    @PostMapping("/pushInformation")
    public AjaxResult pushInformation(@RequestBody WechatInfomation wechatInfomation) {
        Long platformId = SecurityUtils.getPlatformId();
        Boolean aBoolean = wechatInformationService.pushInformation(wechatInfomation,platformId);
        return AjaxResult.success(aBoolean);
    }
}
